package linklist;

/**
 * @author Jonny Long
 * @date 2021/2/1 21:50
 */
public class Solution83 {
    public ListNode deleteDuplicates(ListNode head) {
        ListNode curr=head;
        while (curr!=null && curr.next!=null){
            if (curr.val==curr.next.val){
                curr.next=curr.next.next;
            }else {
                curr=curr.next;
            }
        }
        return head;
    }
}
